/**
 * @author Evgeny Sorokin
 */
Ext.define('USocial.Util',{
	singleton : true,
	
	requires : ['USocial.store.AppUserStore'],
	
	getAppUser : function(){
		return Ext.getStore('AppUserStore').getAt(0);
	},
	
	getUserInfo : function(callback){
		
        var userId = 9837411;
     	var userInfo = Ext.create('USocial.model.UserInfo',{
     		uid : userId,
     		token : 'b91525e1b36cf9a1303372d59cdb54a7a1548fb6d8e4f0e0c66d0127ddc6d9938f4f813f1d111bb862a29'
     	}, userId);
     	USocial.app.setUserInfo(userInfo);
     	userInfo.save();
     	callback(userInfo);
     	
		/*Ext.ModelManager.getModel('USocial.model.UserInfo').load(USocial.getUserId,function(userInfo){
			callback(userInfo);
		});*/
	}
});